using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CaroDL
{
    public partial class StartGame : Form
    {
        public string playerName1;
        public string playerName2;
        public bool iSelect;
        public StartGame()
        {
            InitializeComponent();
            iSelect = false;
        }

        private void btnBatDau_Click(object sender, EventArgs e)
        {
            if (rbHuman1.Checked == true)
                playerName1 = txtPlayer1.Text.Trim();
            else
                playerName1 = "Computer";

            if (rbHuman2.Checked == true)
                playerName2 = txtPlayer2.Text.Trim();
            else
                playerName2 = "Computer";

            iSelect = true;
            this.Close();
        }

        private void rbHuman1_CheckedChanged(object sender, EventArgs e)
        {
            if (rbHuman1.Checked == true)
                txtPlayer1.Enabled = true;
            else
                txtPlayer1.Enabled = false;
        }

        private void rbHuman2_CheckedChanged(object sender, EventArgs e)
        {
            if (rbHuman2.Checked == true)
                txtPlayer2.Enabled = true;
            else
                txtPlayer2.Enabled = false;
        }

        private void StartGame_Load(object sender, EventArgs e)
        {
            rbHuman1.Checked = true;
            rbHuman2.Checked = true;
        }

        private void pbThoat_Click(object sender, EventArgs e)
        {
            iSelect = false;
            this.Close();
        }

        private void btnBatDau_MouseEnter(object sender, EventArgs e)
        {
            btnBatDau.Image = global::CaroDL.Properties.Resources.ChapXong_MouseOver ;
        }

        private void btnBatDau_MouseLeave(object sender, EventArgs e)
        {
            btnBatDau.Image = global::CaroDL.Properties.Resources.ChapXong;
        }

        private void pbThoat_MouseEnter(object sender, EventArgs e)
        {
            pbThoat.Image = global::CaroDL.Properties.Resources.Thoat_MouseOver;
        }

        private void pbThoat_MouseLeave(object sender, EventArgs e)
        {
            pbThoat.Image = global::CaroDL.Properties.Resources.Thoat;
        }
    }
}